package com.xiao.sulingwallet.config;

import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: 1322127758@qq.com
 * @date: 2022/3/30 18:51
 * 指定RabbitMQ的序列化方式 (序列化为JSON)
 * @author 13221
 */
@EnableRabbit
@Configuration
public class RabbitMqConfig {
    @Bean
    public MessageConverter messageConverter(){
        return new Jackson2JsonMessageConverter();
    }
}

